#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char* removeTrailingZeros(char* num) {
    int len = strlen(num) - 1;
    while (len > 0)
    {
        if (num[len] == '0')
        {
            num[len] = '\0';
        }
        else
        {
            break;
        }
        len--;
    }
    return num;
}

int main()
{
    char s[100] = "51230100";
    char* a = NULL;
    a = removeTrailingZeros(s);
    printf("%s", a);
	return 0;
}